package models

import (
	"time"

	"go-admin/common/models"
)

type SysChannel struct {
	models.Model
	ChannelId string    `json:"channelId" gorm:"type:varchar(50);comment:通道ID"`
	Name      string    `json:"name" gorm:"type:varchar(50);comment:通道ID"`
	DeviceId  string    `json:"deviceId" gorm:"type:varchar(50);comment:设备ID"`
	ParentId  string    `json:"parentId" gorm:"column:device_id"`
	Status    int       `json:"status" gorm:"type:tinyint(1);comment:状态"`
	ActiveAt  time.Time `json:"activeAt" gorm:"type:datetime;comment:活跃时间"`
	models.ModelTime
	models.ControlBy
}

func (SysChannel) TableName() string {
	return "sys_channel"
}

func (e *SysChannel) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *SysChannel) GetId() interface{} {
	return e.Id
}
